<%= format_time_fields%>
<% form_for @grupo_horario, :html => {:class => "tabular"},  :builder => UniformBuilder do |f| %>
  <%= f.error_messages %>
  <div class="box">
    <%= f.text_field :nombre,:class=>'required' %>
    <%= f.text_field :carga,:class => "required number"  %>
    <%= f.check_box :controla_salida %>
  </div>
  <h4>Horarios</h4>
  <div class="box">
    <table>
      <tr class="horarios">
        <th>Inicio</th><th>Fin</th><th>Dias</th><th><%= button_to_add_fields "Agregar", f, :horarios%></th>
      </tr>
      <% f.simple_fields_for :horarios do |builder|%>
        <%= render 'horario', :f => builder  %>
      <% end %>
    </table>
  </div>
  <%= f.submit "Guardar" %>
<% end %>
